Monday, 24 June 2019

Deleting a string

"""# Python Program to Delete
 characters from a String """

>>> a = "Hyd is a green city"
>>> print(a)

# Deleting a character
# of the String
>>> del a[2] # Error I can't delete index wise
>>> del a# Ok we can delete entire strig

>>> print(a)

"""output
Hyd is a green city
Error
>>> """"

You may like the following posts:

No comments:

Post a Comment

Files with Exception handling

#Ask the user to take two input integer values var a,b try:     a=int(input("enter any integer value:"))     b=int(input(&qu...