Check the below code.
extensionsToCheck = ['ALL QTRLY PAYMENTS', 'ATC', 'TL INTEREST', 'TL LIBOR INT']
url_string = "DCA INVESTMENT TL LIBOR INT"
if any(ext in url_string for ext in extensionsToCheck):
print(url_string)
print(ext)
I want the value of ext
variable value, but I am not able to get this value. I am getting the following error:
NameError: name 'ext' is not defined
How can I access the ext
variable in if loop? Is there any way to get the ext
variable value in if loop?