-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintro.py
84 lines (58 loc) · 1.77 KB
/
intro.py
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
new_black = 10;
# print(new_black);
# print(type(new_black));
# float_me = 0.5;
# print(float_me);
# print(type(float_me));
# stringify = "We had a downpour 2 days ago in lagos!";
# print(stringify);
# print(type(stringify));
# mylist = ['merovingian', "oracle", 0.25, True, 2500000]
# print(mylist);
# print(type(mylist));
# mytuple = ('merovingian', "oracle", 0.25, True, 2500000)
# print(mytuple);
# print(type(mytuple));
# sports = {"football", "cricket", "baseball", "cricket", "Badminton"}
# print(sports);
# print(type(sports));
# firstNum = 67
# secondNum = 40;
# feedback = ((firstNum % 2 != 0) or (secondNum > firstNum)) and not((secondNum == 40) or (pssecondNum // 2 != 0))
# print(feedback)
# career = 'She is a model!'
# output = 'mo' in career;
# print(output)
# print(f"I think {career}")
# career = 'She is a model, lives in cali'
# desired_char = career[-1]
# desired_portion = career[:10]
# desired_portion1 = career[4:]
# print(desired_char)
# print(desired_portion)
# print(desired_portion1);
# age = 24
# name = "Blue"
# career_new = f"{career} and is {age} years old!";
# print(career_new)
# print(career_new.title())
# print(career_new.startswith("She is"))
# print(career_new.index("cali"))
# print(career_new.find("cali"))
# print(career_new.split("!"))
# print(type((career_new.split(" "))))
# print(name.replace('ue', 'iss'));
random_stuff = ["pawn", "phone", "pen", "ball", False, 99.69, 2021, 4+2j, "phone"]
desired_items = random_stuff[::3]
print(desired_items);
random_stuff[3:6:2] = ["chair", True]
print(random_stuff.count("phone"));
print(random_stuff[0].replace("w", ""))
flist = [3, 6, 7]
slist = [8, 9, 10]
flist.extend(slist)
whole = flist + slist
whole.sort(reverse=True)
print(whole);
mint = {'flavour': 'fresh', 'germs': 'dead'}
print(type(mint))