0

I am trying to read the data from a text file given in a tree format.

A sample of the text file looks like this,

['972651', '80080680482123777', '0.0']->['10678072', '80080680482123777', '1.8']
['972651', '80080680482123777', '0.0']->['14569462', '80080680482123777', '1.8']
['972651', '80080680482123777', '0.0']->['41634505', '80080680482123777', '1.8']
['972651', '80080680482123777', '0.0']->['81232966', '80080680482123777', '1.8']
['972651', '80080680482123777', '0.0']->['21282483', '80080680482123777', '1.8']
['972651', '80080680482123777', '0.0']->['35165557', '80080680482123777', '1.8']
['972651', '80080680482123777', '0.0']->['12735762', '80080680482123777', '1.8']
['972651', '80080680482123777', '0.0']->['39076620', '80080680482123777', '1.8']

In the tree file, each line represents an edge given in the following format:
** parent node -> child node
** Each node is given as a tuple: ['uid', 'tweet ID', 'time delay']

I am not sure how shall I read this data. Can someone please help?

4
  • Could you paste that sample data into your post as text, rather than using an image? Commented Apr 19, 2022 at 21:10
  • 2
    Please do not post text as images. Copy and paste the text into your question and use the code formatting tool to format it correctly. Images are not searchable, cannot be interpreted by screen readers for those with visual impairments, and cannot be copied for testing and debugging purposes. Use the edit link to modify your question. Commented Apr 19, 2022 at 21:10
  • Hello, @BrokenBenchmark I posted the sample data as text instead of an image. Can you help now? Commented Apr 25, 2022 at 16:07
  • Sure, I will keep that in mind. @MattDMo Commented Apr 25, 2022 at 16:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.