Monday, July 8, 2019

Python String Variable Demonstration

Python String Variable Demonstration







# Python String Variable Demonstration

# Declaration

#String Declaration with a single quote for single line display
x= ''
print (x)

#String Declaration with a double quote for single line display
x= "    "
print (x)

#String Declaration with multi-line print with a single quote
x = '''Hello
This is Python Multiline
demo
'''
print (x)


#String Declaration with multi-line print with double quote
x = """Hello
This is Python Multiline
demo
"""
print (x)

#How print works
x= 'hello'
#variable will be printed
print (x)

#x as a string will be printed
print ('x')

#x as a string will be printed
print ("x")

#variable x will be printed in string conversation
print (str(x))

#repr()  representation that has all information
print (repr(x))

4 comments:

Ethical Hacking Techniques: Cracking WPA/WPA2 Wi-Fi Using WPS and Capturing Handshakes

In the realm of cyber security, ethical hacking plays a crucial role in identifying and addressing vulnerabilities. One of the areas where e...