mirea-projects/First term/Algorithms/4/5.py

17 lines
338 B
Python
Raw Permalink Normal View History

2024-09-23 23:22:33 +00:00
def main() -> None:
# Config
arr = ["а", "b", "с", "d", "с", "е", "f"]
# Main code
some_dict = {}
for index in range(len(arr)):
if some_dict.get(arr[index]) is not None:
print(arr[index])
break
some_dict[arr[index]] = index
if __name__ == "__main__":
main()