'Upload file if not exists to Google Drive using Python

Is there a way, using Python, to query a Google Drive to see if a file already exists in the folder with the same name. If it finds the same file name, ignore it, if it doesn't find it, upload it?

I've found the code for uploading files, but haven't been able to track down how to check for the existence of file and if it doesn't already exist, to upload it.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source