I am using Python Selenium to parse some live data (Bets) , I am use While loop
this is some logic from my code
def parse():
while True:
x = driver.find_element_by_xpath('//*[@id="bets-history"]/li[0]').text
print(x)
This code working but output is
1.54x
1.54x
1.54x
1.54x
1.54x
1.54x
1.54x
1.54x
1.54x
1.54x
1.54x
1.54x
1.54x
1.54x
1.54x
1.54x
1.54x
1.54x
1.54x
13.5x
13.5x
13.5x
13.5x
13.5x
13.5x
13.5x
13.5x
13.5x
13.5x
13.5x
13.5x
What is best way to get only one print? for example like this
1.54x
13.5x
1.54after those13.5? Would be printed again (once), or not because1.54was already printed, ever?