Задача Задача №18979
А
А
Sure, here is the code for solving the problem:
# Input string
input_str = "На улице хорошая солнечная погода."
# Find the indices of spaces
space_indices = []
for i in range(len(input_str)):
if input_str[i] == ' ':
space_indices.append(i)
# Get the start and end indices of the third word
start_index = space_indices[1] + 1
end_index = space_indices[2]
# Extract the third word using string slicing
third_word = input_str[start_index:end_index]
# Print the third word
print(third_word)
Please run this program and let me know if you encounter any issues.
