New submission from Ramesh Sahoo <rameshsaho...@gmail.com>:

With for loop, I am able to print all elements in the list 'a'

a = ['a','a','b','b','c']
for i in a:
    print(i)

O/P: 

a
a
b
b
c

but with the following loop, python only prints 3 uniq elements instead of 5. 

stack = ['(', '(', '[', ']', ')']
for i in stack:
    print(i)

O/P: 
(
]
)


Is this is intended behavior?

----------
messages: 375136
nosy: rameshsahoo11
priority: normal
severity: normal
status: open
title: incorrect printing behavior with parenthesis symbols
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41518>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to