-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhello.py
More file actions
33 lines (24 loc) · 745 Bytes
/
Copy pathhello.py
File metadata and controls
33 lines (24 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# $Id: hello.py, ba755c6924d3 makhtar $
import sys
import datetime as dt
from time import sleep
today = dt.date.today()
print(str.capitalize("hello python, today is") ,
dt.datetime.strftime(today, "%A, %B %d, %Y"))
print("Running argv[0]: " + sys.argv[0])
msg = "Programming is just logic"
print(msg, len(msg))
words = ['monster', 'window', 'appear']
for w in words:
print(w, w.__class__, len(w))
print("Raw string: " + r'C:\some\name')
i = 0
while i < len(msg):
print(msg[i], end=' ')
sleep(0.05)
i += 1
for w in words[:]: # Loop over a slice copy of the entire list.
if len(w) > 6:
words.insert(0, w)
print("\n", words, words.__class__)
print(isinstance(words, str), isinstance(words, list))