I would like to know if there is a way to turn this into a for loop so it looks better.
print(self.User_Edit_1.text())
print(self.User_Edit_2.text())
print(self.User_Edit_3.text())
print(self.User_Edit_4.text())
print(self.User_Edit_5.text())
print(self.User_Edit_6.text())
print(self.User_Edit_7.text())
I want it to look something like this:
for i in range(1,8):
print(self.User_Edit_{i}.text())
I have tried with an f string but it does not allow nested variables I don't think, I could turn it into a string, change the index, and then change it back to that kind of object, but I do not know how.
The class of the object is PyQt5.QtWidgets.QLineEdit, I am making a GUI.
On a related note, are their any current tutorials about PyQT5, the ones I have seen are from pyqt4 from 2015 and they do not work anymore and the docs seem rather confusing to use (I have tried)