diff --git a/HNS/Excercises/12082023 Найти второй символ в строке/.idea/.gitignore b/HNS/Excercises/12082023 Найти второй символ в строке/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/HNS/Excercises/12082023 Найти второй символ в строке/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/HNS/Excercises/12082023 Найти второй символ в строке/.idea/inspectionProfiles/profiles_settings.xml b/HNS/Excercises/12082023 Найти второй символ в строке/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/HNS/Excercises/12082023 Найти второй символ в строке/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/HNS/Excercises/12082023 Найти второй символ в строке/.idea/misc.xml b/HNS/Excercises/12082023 Найти второй символ в строке/.idea/misc.xml new file mode 100644 index 0000000..2522946 --- /dev/null +++ b/HNS/Excercises/12082023 Найти второй символ в строке/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/HNS/Excercises/12082023 Найти второй символ в строке/.idea/modules.xml b/HNS/Excercises/12082023 Найти второй символ в строке/.idea/modules.xml new file mode 100644 index 0000000..f1f53c0 --- /dev/null +++ b/HNS/Excercises/12082023 Найти второй символ в строке/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/HNS/Excercises/12082023 Найти второй символ в строке/.idea/vcs.xml b/HNS/Excercises/12082023 Найти второй символ в строке/.idea/vcs.xml new file mode 100644 index 0000000..c2365ab --- /dev/null +++ b/HNS/Excercises/12082023 Найти второй символ в строке/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/HNS/Excercises/12082023 Найти второй символ в строке/.idea/ДЗ тестирование 2.iml b/HNS/Excercises/12082023 Найти второй символ в строке/.idea/ДЗ тестирование 2.iml new file mode 100644 index 0000000..d0876a7 --- /dev/null +++ b/HNS/Excercises/12082023 Найти второй символ в строке/.idea/ДЗ тестирование 2.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/HNS/Excercises/12082023 Найти второй символ в строке/main.py b/HNS/Excercises/12082023 Найти второй символ в строке/main.py new file mode 100644 index 0000000..cea7692 --- /dev/null +++ b/HNS/Excercises/12082023 Найти второй символ в строке/main.py @@ -0,0 +1,17 @@ +def first_recurring_char(s): + array = [] + z = str + if type(s) is str and s is not None: + for i in s: + array.append(i) + k = + 1 + for j in array[0:k - 1]: + if j == i: + p = +1 + print(p) + if p > 1: + z = str(j) + return z + + +print(first_recurring_char("вадвава"))