Computer Science, asked by abdulafjalakhtar225, 11 months ago

III
2
(b) s = "Strings in Python"
print(s.capitalize()).
print(s.title())
s6=s.replace("in", "data type")
print (6) give me output ​

Answers

Answered by Anonymous
2

Answer:

Creating strings

1

2

>>> name = "tom" # a string

>>> mychar = 'a' # a character

You can also use the following syntax to create strings.

1

2

>>> name1 = str() # this will create empty string object

>>> name2 = str("newstring") # string object containing 'newstring'

1

name = "tom" # a string

2

mychar = 'a' # a character

3

4

print(name)

5

print(mychar)

6

7

name1 = str() # this will create empty string object

8

name2 = str("newstring") # string object containing 'newstring'

9

10

print(name1)

11

print(name2)

Similar questions