Answer the question
In order to leave comments, you need to log in
Why might the sticky positioning property not work in the safari browser?
Hello friends, there was such a moment, positioning when scrolling to the top through sticky works in all browsers except Safari , although native support for this property is generally supported by 90% compared to other browsers. I’ll say right away that I haven’t used Stickyfill or Angular Sticky to solve the problem, so I can’t say what behavior after application, while I want to solve it in a standard and clean way!
Here is attached screenshot from DevelopersTools watch here
Answer the question
In order to leave comments, you need to log in
First you need to read the file, before iterating its lines, this is done with read_file = f.read().split('\n')
an error:
You are trying to compare a tuple and a string - this is not possible, you need to compare the same data types, i.e. in your case string and string. This zadaniepoisk = ('a',zadanie,'a')
is a tuple , and this zadaniepoisk = 'a' + zadanie + 'a'
is a string .
with open('C:/Users/Home/Desktop/test.txt','r') as f:
read_file = f.read().split('\n')
zadaniepoisk = 'a' + zadanie + 'a'
counter = 1
for line in read_file:
if zadaniepoisk in line:
print(counter)
break
counter += 1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question