-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path23.py
More file actions
27 lines (14 loc) · 663 Bytes
/
23.py
File metadata and controls
27 lines (14 loc) · 663 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
# keyword arguements = preceded by an identifier
# helps with readability
# order of arguements doesn't matter
# position arguements is always first before keyword arguements
def hello(greeting, title, first, last):
print(f"{greeting} {title}{first} {last}")
hello("Hello", title="Mr.", last="Thomas", first="Shayen")
for number in range(1, 11):
print(number, end=" ")
print("1", "2", "3", "4", "5", sep="-")
def get_phone(country, area, first, last):
return f"{country}-{area}-{first}-{last}"
phone_num = get_phone(country=1, area=123, first=456, last=7890)
print(phone_num)