Skip to content Skip to sidebar Skip to footer

Nameerror: Name 'book' Is Not Defined

This is my piece of code: #!/usr/bin/python from xml.etree.ElementTree import ElementTree from array import * #import re count = array('i',[0,0,0]) def find_root_tags(file,str

Solution 1:

input() acts like eval(raw_input()) for Python 2:

input(...)
    input([prompt]) -> value

    Equivalent to eval(raw_input(prompt)).

You're probably looking for raw_input()

Post a Comment for "Nameerror: Name 'book' Is Not Defined"