def common_elements():
    listone=open(r"C:\Users\hem\PycharmProjects\scrapy\txt\pani_a00clean.txt","r+")
    listtwo=open(r"C:\Users\hem\PycharmProjects\scrapy\txt\saeedeh.safinoorclean.txt","r+")
    listthree=open(r"C:\Users\hem\PycharmProjects\scrapy\txt\rosapishbinclean.txt","r+")
    listfour=open(r"C:\Users\hem\PycharmProjects\scrapy\pani_a00&rosapishbinclean.txt","r+")
    listfive=open(r"C:\Users\hem\PycharmProjects\scrapy\pani_a00&saeedeh.safinoorcleanclean.txt","r+")
    share=open(input("filename: ")+".txt","w+")

    # print([element for element in listone if element in listtwo])
    commons=set(listfour.readlines())&(set(listfive.readlines()))
    commons=list(commons)
    share.write(str(commons)+"\n"+"same user count: "+str(len(commons)))
    print(1,len(commons))
    print(commons)
    listone.close()
    listtwo.close()
    listthree.close()
    listfour.close()
    listfive.close()
    share.close()
common_elements()