4 Answers
+ 8
ip = '192.168.20.2'
port = '80'
print('The IP address is', ip, 'and the Port number is', port)
print('The IP address is ' + ip + ' and the Port number is ' + port)
print('The IP address is %s and the Port number is %s' % (ip, port))
print(f'The IP address is {ip} and the Port number is {port}')
print('The IP address is {} and the Port number is {}'.format(ip, port))
+ 9
Print("ip address is {0} and port {1}").format(ip,port)
+ 2
Hubert Dudek Thanks
+ 2
Anna I missed the commas. Thanks