import os
import pickle
import yaml

user_input = input()
with open(user_input, 'rb') as file:
    contents = pickle.load(file) # Niebezpieczeństwo!
with open(user_input, 'rb') as file:
    contents = yaml.load(file) # Niebezpieczeństwo!