how to use raw input cammand on python
Hoot! You just asked your first question! Hang tight while I find people to answer it for you. You can thank people who give you good answers by clicking the 'Good Answer' button on the right!
name=raw_input("Name:") print name or use try: no=int(raw_input("Enter a no:")) print no except ValueError: print "It should be integer no" python filename.py
Traceback (most recent call last): File "D:/learn python/raw.py", line 1, in <module> name=raw_input("Name:") NameError: name 'raw_input' is not defined
You have to use input() since it is 3.2 vrsion
Or if you are working with some code that uses raw_input already you can just type: raw_input = input At the top of your file.
Join our real-time social learning platform and learn together with your friends!