why does this gives error print "module {0}".format(key)
, i hope this is nt the python version problem...
krystosan
0
Junior Poster
Recommended Answers
Jump to Post>>> #Python2.x >>> key = 5 >>> print "module {0}".format(key) module 5 >>> #Python 3.x >>> print("module {0}".format(key)) module 5
Jump to PostThe Python3 str.format() method has been backported to Python 2.6.
See
…
http://docs.python.org/2.6/library/stdtypes.html
http://docs.python.org/2.6/whatsnew/2.6.html
and
PEP 3101
All 6 Replies
snippsat
661
Master Poster
Gribouillis
1,391
Programming Explorer
Team Colleague
krystosan
0
Junior Poster
krystosan
0
Junior Poster
ZZucker
342
Practically a Master Poster
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.