I am trying to concatenate two strings, the problem i'm running into is that when I concatenate, the text goes to the next line. I am using selenium import webdriver
. My code is:
randomNum = ""
tries = 0
while (tries < 5):
randomNum += str(random.randint(0, 9))
tries = tries + 1
input = driver.find_element_by_id('identifierId')
email = name + randomNum
input.send_keys(email)
print email
I have also tried
randomNum = []
tries = 0
while (tries < 5):
randomNum.append(random.randint(0, 9))
tries = tries + 1
input = driver.find_element_by_id('identifierId')
email = name + "".join(str(num) for num in randomNum)
input.send_keys(email)
print email
But when I print email
my output is something like
Indoana
16029
I don't know why this is, I need it to be Indoana16029