Which of the following variables is named incorrectly? Why?
(A) mm_520 (B) _mm520_ (C) 520_mm (D) _520_mm
Answer: c is incorrect, cannot start with a number
In the case of not on the machine, the following code can you guess what the screen will print?
>>>myteacher = ' Little Turtle '
>>>yourteacher = Myteacher
>>>yourteacher = ' Night '
>>>print (Myteacher)
Copy Code
|
A: Little Turtle
In the case of not on the machine, the following code can you guess what the screen will print?
>>> myteacher = ' Little Turtle '
>>> Yourteacher = Myteacher
>>> myteacher = ' Night '
>>> Print (Yourteacher)
Copy Code
A: Little Turtle
In the case of not on the machine, the following code can you guess what the screen will print?
>>>first = 520
>>>second = ' 520 '
>>>first = Second
>>>print (first)
Copy Code
Answer: 520 string
In addition to using the rice slash (\) for character escapes, what else can be printed: let's go! This string?
Answer: "Let's go!"
If you want to enter a backslash at the end of the original string, how can you handle it flexibly?
Answer: R ' C:\Program files\fishc\good ' \ \ '
Do you remember the first moving question we talked about? This time a variable is required to calculate how many seconds are in a year?
Daysperyear = 365HoursPerDay = 24MinutesPerHour = 60SecondsPerMinute = 60result = daysperyear * HoursPerDay * Minutesperho ur * Secondsperminuteprint (Result)
On the last mention of the long string (Sanchong quote string) in fact, in Python3 can also write this, may try, and then compare which is more convenient?
String = ("...")
This article is from the "Champion Small Lemon" blog, please make sure to keep this source http://lemonit.blog.51cto.com/6043645/1597825
Python Lesson Three notes