import os, glob
# Get a list of all files in the system
files = glob.glob('*.*')
# Iterate over the list of files
for file in files:
# Separate filename and its extension
name, ext = os.path.splitext(file)
# Rename the file without its extension
os.rename(file, name)