HTTP-сайты не работают, а сайты HTTPS находятся в ubuntu 16.04 [закрыто]

Через мой любимый Python ...

with open('/path/to/the/file') as f:
    counter = False
    for line in f:
        if line.startswith('*') and not counter:
            m = line.strip().lstrip('*')
            counter = True
        elif line.startswith('*') and counter:
            counter = False    
        elif counter:
            if not line.startswith('*'):
                print(line.strip() + m)
        else:
            print(line.strip())  
2
задан 18 February 2018 в 10:35

0 ответов

Другие вопросы по тегам:

Похожие вопросы: