Home > other > Small white for help. Use python2.7 row_input input string, can't read out
Small white for help. Use python2.7 row_input input string, can't read out
Time:11-23
book_name=raw_input (" both please input the order: "). The decode (encoding="utf-8") Print book_name If book_name books_list in: Print (' the book belongs to Numbers for: % d number. The decode (' utf-8) encode (' GBK) % books_list [book_name]) The else: Print (u 'no such book')
Can read out the title of the print out, but will find it in the dict books_list, has been ascertained, I think it is a coding problem, search the answer to the following on the Internet, seems to still can not solve, ask everybody to help, just a few days to start learning python,
CodePudding user response:
1. Look from the indentation of your code very confusion - "post code copy out you can't run
So still trouble you, reference: Learn to map and post code - CSDN, BBS BBS Python beginner, small white common errors and problems Code to post, complete, accurate,
Convenient and then others will help you find out your problem,
2. Also: You here Books_list Didn't stick out the value of the Code is not complete, others also not good for you, As far as possible can stick out, put out,