Answers for "python string literal variable"

2

embed variables python

#Pre 3.6
print('Hi, my name is {name} and my age is {age}'.format(**locals()))

#After 3.6
print('Hi, my name is {name} and my age is {age}')
Posted by: Guest on July-22-2020
0

python literal string

>>> r'abcdevt' # Use the r prefix
# Result:
'abc\dev\t'
Posted by: Guest on June-09-2021
0

python literal string

String literal is a datatype in python.
which is used to store characters of variable length
For example :-
  a = 'This is a string'
  b = 'You can also includes these @#$%^&*( or 12345678'
Above there are two variables a and b having string literal as there values
Posted by: Guest on March-15-2021

Python Answers by Framework

Browse Popular Code Answers by Language