Im trying to make a script for Discord with python. But I have a weird thing with it. When I run this:
x = 1
def main():
try:
global x
NitroCode = open("NitroCode.txt")
Codes = NitroCode.readlines()
#Url
url = ("https://discordapp.com/api/v6/entitlements/gift-codes/" + Codes[x] + "?with_application=false&with_subscription_plan=true")
print(url)
x += 1
main()
except IndexError:
print('Done Checking')
exit()
main()
I get this output
https://discordapp.com/api/v6/entitlements/gift-codes/b
?with_application=false&with_subscription_plan=true
https://discordapp.com/api/v6/entitlements/gift-codes/c
?with_application=false&with_subscription_plan=true
https://discordapp.com/api/v6/entitlements/gift-codes/d
?with_application=false&with_subscription_plan=true
https://discordapp.com/api/v6/entitlements/gift-codes/e
?with_application=false&with_subscription_plan=true
https://discordapp.com/api/v6/entitlements/gift-codes/f
?with_application=false&with_subscription_plan=true
https://discordapp.com/api/v6/entitlements/gift-codes/g
?with_application=false&with_subscription_plan=true
https://discordapp.com/api/v6/entitlements/gift-codes/h
?with_application=false&with_subscription_plan=true
https://discordapp.com/api/v6/entitlements/gift-codes/i
?with_application=false&with_subscription_plan=true
https://discordapp.com/api/v6/entitlements/gift-codes/j
?with_application=false&with_subscription_plan=true
https://discordapp.com/api/v6/entitlements/gift-codes/k?with_application=false&with_subscription_plan=true
Done Checking
Why is the last link is printed on a single line and others on two?