9. Library time
¶
Current time in seconds
time.clock()
Am I in daylight saving time?
time.daylight()
Sleep for a few seconds,
time.sleep(seconds)
Timezone
time.timezone()
9.1. 10 seconds between each access¶
9.2. Summary¶
Strings are character strings.
We access individual characters by their index, starting at zero.
Methods are functions built into variables.
There are programming libraries with ready-made code.
Data has a type, such as
int
orstring
.
9.3. Python Tools¶
text[4]
accesses the fifth character.text[4:9]
accesses from the fifth to the ninth character.The method
text.find()
searches for a substring.float()
converts something to a floating point number.Libraries:
urllib.request
andtime
.
-
On a scale from 1 (needs improvement) to 3 (excellent),
how would you rate this chapter?
- 1
- 2
- 3
You have attempted of activities on this page