You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a groupchat, the file are in rar format and after download i decompress all of them, the result is the same filename with a different extension , could you help me with the syntax ?
original line is :
if _is_exist(file_name):
my attempt:
if _is_exist(file_name) or _is_exist(file_name.replace('rar', 'avi')) or _is_exist(file_name.replace('rar', 'mp4')):
is it correct the way i do to check for different extension in the same line , and or maybe there is a way to do in several line with some like in vba "case" statement like :
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In a groupchat, the file are in rar format and after download i decompress all of them, the result is the same filename with a different extension , could you help me with the syntax ?
original line is :
if _is_exist(file_name):
my attempt:
if _is_exist(file_name) or _is_exist(file_name.replace('rar', 'avi')) or _is_exist(file_name.replace('rar', 'mp4')):
Beta Was this translation helpful? Give feedback.
All reactions