Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~63.3K People Reached
Favorite Forums
Favorite Tags
Member Avatar for gunjan_3

This is what I have: When I try to do this, it shows me an error: IndexError: list index out of range Could someone help? with open(os.path.join(path, file.replace(".root", ".txt")), 'r') as f: lines = f.readlines() htemp = TH1D(name, name, nBins, eMin, eMax) for i in range(len(lines)): htemp.SetBinContent(i + 1, float(lines[i])) …

Member Avatar for Gribouillis
0
270
Member Avatar for ruwach

Hey there. i want to set a variable to represent the last line of a text file how do i do that? or even better, how do i create a list of the lines of a text file? any suggestions?

Member Avatar for gunjan_3
0
63K