Write a program to assign and display a string value to any variable of your choice
Answers
Answered by
3
Answer:
St='Plz Mark me as a BRAINLIEST'
print(St)
Answered by
0
You can write the following program in the python programming language.
a="Hello, this is a python program."
print(a)
print(type(a))
Output:
"Hello, this is a python program."
<class 'str'>
- In the above program, we assigned the string value "Hello, this is a python program." to the variable 'a'.
- Now to see the value of 'a' we are printing it with the print command.
- And we have the output as "Hello, this is a python program."
- To know what type of variable 'a' is, so we use the 'type of ' command to know the type of 'a'
- We print the type of 'a', which is an 'str' a string.
- Hence we took a variable 'a' and assigned the string value to it.
#SPJ3
Similar questions