You can just use a simple for loop that will exclude any file or directory that has "." in the front.
专业守则:
import os
directory_things = [i for i in os.listdir() if i[0] != "."] # Exclude all with . in the start
菜鸟的代号
items_in_directory = os.listdir()
final_items_in_directory = []
for i in items_in_directory:
if i[0] != ".": # If the item doesn't have any '.' in the start
final_items_in_directory.append(i)