mirea-projects/First term/Algorithms/4/5.py
2024-09-24 02:22:33 +03:00

17 lines
338 B
Python
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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()