June 2018
Intermediate to advanced
294 pages
7h 5m
English
Use the string variable type when you want to store a set of characters into that variable:
ip_address = '10.0.0.1'# Or you can use double quotes:ip_address= "10.0.0.1"#Multiple lines, using triple double quotes/single quoteswelcome_message = """ Hello there, welcome to our powerful intelligent script, you will be amazed!"""
device_name = 'Cisco Router 2911'ip_address = '10.0.1.1'host = device_name + ":" + ip_address
ip_address = '10.0.1.1'host = "router IP address is : %s" % ip_address
Read now
Unlock full access