So I know not all of this is correct but this is what I have. I'm just trying to write a script that can ping google or yahoo by selecting 1 or 2 and a third option to enter a custom URL if anyone could help me out with that Id appreciate it.
import os
print('1. Ping Google')
print('2. Ping Yahoo')
print('3. Ping custom URL')
key = input('Input your choice: ')
if key == 1:
os.system("ping google.com")
elif key == 2:
os.system("ping yahoo.com")
elif key == 3:
input('Enter URL: ')

url = raw_input('Enter URL: '); os.system("ping " + url)