-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpractice.py
More file actions
41 lines (27 loc) · 938 Bytes
/
practice.py
File metadata and controls
41 lines (27 loc) · 938 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
34
35
36
37
38
39
40
41
# Strings
first_name = "Ankit"
last_name = "Modi"
print(first_name)
print(last_name)
full_name = first_name + last_name
print(full_name)
# printing name with spaces
full_name = first_name + " " + last_name
print(full_name)
# OR you can print it like this also
# with no difference
print(first_name + " " + last_name)
# when you want to write long strings, you can use ''' or """
long_string = """What do you want to do today evening??
let's go to theatre to watch a fun movie....
okay, let's go"""
print(long_string)
long_string1 = """What do you want to do today evening??
let's go to theatre to watch a fun movie....
okay, let's go"""
print(long_string1)
# below are the examples of string concatenation
# use type() to get the type of variable
print("Printing,", "C", " and its type is ", type("C"))
print("Printing,", "Hello", " and its type is ", type("Hello!"))
print("Printing,", 100, " and its type is ", type(100))