Skip to content

Форматирование строки #23

@nevstruevdmitriy

Description

@nevstruevdmitriy

out.write(vector_edges + '.' + emplace_back + '(' + vertex_from + ', ' + vertex_to + ', ' + line[2] + ');\n')

В питоне есть клёвый и полезный оператор % для строки и кортежа

он делает примерно следующее

"Вот это 5 а вот это то же %d %s" % (5, "не правда ли, клёва?")

Короче как в printf(), scanf()
))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions