Saturday, 23 February 2019

python string

message = """
Hi bob,

congratulate on your work anniversary.

sent from linkedin
"""

print(message)

Hi bob,

congratulate on your work anniversary.

sent from linkedin

message = "python \"string"
print(message)

python "string

message = "python \nstring"
print(message)

python
string

a = 'python'
b = 'string'
print(f'{a} {b}')

python string

a = 'python'
b = 'string'
print(a + ' ' + b)

python string

subject = ' python string '
print(subject.upper())
print(subject.lower())
print(subject.title())
print(subject.rstrip())
print(subject.lstrip())
print(subject.strip())
print(subject.find('str'))
print(subject.replace('n', '*'))
print('str' in subject)

 PYTHON STRING
 python string
 Python String
 python string
python string
python string
8
 pytho* stri*g
True

No comments:

Post a Comment