A
A
Animkim2016-03-15 15:29:06
Python
Animkim, 2016-03-15 15:29:06

Sublime Text 3, Python console outputting 0x7f1c7bdf77b8 instead of a list?

def check_connection(network, first, second):
    networ = [lambda x: x.split('-') for x in network]
    print(networ)

check_connection(
        ("dr101-mr99", "mr99-out00", "dr101-out00", "scout1-scout2",
         "scout3-scout1", "scout1-scout4", "scout4-sscout", "sscout-super"),
        "scout2", "scout3")

Консоль в редакторе выдает ответ в стиле <function check_connection.<locals>.<listcomp>.<lambda> at 0x7fde16b58730> к каждому объекту списка вместо человеческого вывода.

So the question is how to make a normal conclusion, or if I rephrase, where am I stupid?
Why is this happening?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2016-03-15
@Animkim

Because you have a list of lambda x functions: x.split('-')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question