Answers for "\r in python"

3

setter in python

# of get() and set() method in 
# normal function 
  
class Geek: 
    def __init__(self, age = 0): 
         self._age = age 
      
    # getter method 
    def get_age(self): 
        return self._age 
      
    # setter method 
    def set_age(self, x): 
        self._age = x 
  
raj = Geek() 
  
# setting the age using setter 
raj.set_age(21) 
  
# retrieving age using getter 
print(raj.get_age())
Posted by: Guest on October-01-2020
0

rn python

print "n",
print "r",
print "rn",
Posted by: Guest on November-05-2020
0

what is r in python

# a normal string which treats a back slash as a special character and changes some properties of it
("D:UserslegendaryPicturesSaved Picturesbugatti.jpg")

#we use r string to write paths without any conflit since they contain backshlases

# >>> this is an r string
(r"D:UserslegendaryPicturesSaved Picturesbugatti.jpg")
Posted by: Guest on April-12-2021

Python Answers by Framework

Browse Popular Code Answers by Language