11 lines
148 B
Python
11 lines
148 B
Python
|
#6.
|
||
|
s = "This is a test"
|
||
|
print(s)
|
||
|
|
||
|
#1.
|
||
|
print("Spaces replaced with '-':", s.replace(' ', '-'))
|
||
|
|
||
|
#2.
|
||
|
s1 = "Hello, World"[-7::-1]
|
||
|
print(s1)
|