1
Is there a way to go back to the beginning of a function using an if gate?
TristanMisja (6)

NOTE: This is only a sample of the code, and it won't show tabs.

import sys
import os
import string
import math
import colorama
import time

def login():
global username
global password
uy = None
cp
username = input("What is your username?\n\t")
uy = input("Username is " + username + ". Is this true? (y/n)")
if uy == "y":
continue
elif uy == "n":
#This is where I want it
password = getpass.getpass("What is your password?\n\t")
cp = getpass.getpass("Confirm your password:\n\t")
if cp == password:
continue
else:
#This is also where I want it

You are viewing a single comment. View All
1
TristanMisja (6)

@heyitsmarcus Ok I'll test this I'm just not sure if you can use a function inside itself... but thx!