How to open a text file in python?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • achini
    New Member
    • Jul 2013
    • 1

    How to open a text file in python?

    I want to open a text document which contain a graph like this type.
    8
    16
    0 5
    2 4
    2 3
    1 2
    0 1
    3 4
    3 5
    0 2

    8 vertices & 16 edges.
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    A text file is opened with built-in function open(). What do you want to do with the data?

    Comment

    Working...