+ 2
How can I print two or more strings in a same list?
for example: things=["spam",0,2] print(things[0][1][3]) #i know, its wrong '[3]' #expect results: p,m
2 Respuestas
+ 6
You can either enumerate them (if you have to have them printed after a comma) or try a proper slicing technique:
things=["spam",0,2]
print(things[0][1::2])
# pm
+ 3
thanks for help!