You started right by using the trytond-console
command. You can copy the commands line by line, but you must keep the indentation.
For example with https://discuss.tryton.org/t/migration-from-6-8-to-7-0 there is a for-loop. So for the lines which are indented you also must copy the (4 spaces) in front of them as well.
When you have copied the last line of the for-loop, you also have to press to add the empty line as shown and get the for-loop executed.
Also at the top-right corner of the code, when you hover with the mouse there, a icon pops up. Click it to copy the whole part and you can paste it directly into your console. You have only press for the last command to be executed.