Python “for i in” + variable

后端 未结 3 1053
一整个雨季
一整个雨季 2021-01-26 23:31

I have the following code:

 #Euler Problem 1

    print \"We are going to solve Project Euler\'s Problem #1\"

    euler_number = input(\'What number do you want         


        
3条回答
  •  猫巷女王i
    2021-01-26 23:56

    Here's the documentation for Python's for syntax: http://docs.python.org/2/reference/compound_stmts.html#for

    It loops over any sequence of values, not just a sequence of numbers like in other languages.

    Have fun learning Python, it's a great language. Also, the Project Euler challenges are fun, so stick with them, and don't give up!

提交回复
热议问题