Answer the question
In order to leave comments, you need to log in
python string input/output?
Hello.
The question is most likely the simplest, but I just can’t figure it out, please help or tell me how to be right.
At the input we have a list with several data, let it be: Vasya Petya Serezha, etc.
How to get data in the output format:
Vasya
Line 1
Petya
Line 2
..............
Serezha
Line N
I would be very grateful.
Answer the question
In order to leave comments, you need to log in
for index, item in enumerate(['вася', 'петя', 'саша'], start=1):
print(f'{item}\nСтрока № {index}')
import ipaddress
mac_addresses = ['aa:bb:cc:aa:bb:11', 'aa:bb:cc:aa:bb:12', 'aa:bb:cc:aa:bb:13', 'aa:bb:cc:aa:bb:14', 'aa:bb:cc:aa:bb:15']
start_ip = ipaddress.ip_address('192.168.0.11')
for index, mac_address in enumerate(mac_addresses):
print(f'MAC {mac_address}\nIP {start_ip + index}\n')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question