generate_packets.py: use f-strings
Depends on #44767. Use Python 3.6's format string interpolation (f-strings) instead of str.format() or printf-style (%) formatting where possible.
Patch might have textual dependencies on #48690
Depends on #44767. Use Python 3.6's format string interpolation (f-strings) instead of str.format() or printf-style (%) formatting where possible.