blob: e85be28f39a4714634c1cd6c2bf9fe0e2a5735dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
'''Function to print a colored line to terminal'''
def print_colored(message):
print(f'\033[0;31m{message}\033[m') # red
if __name__ == '__main__':
print('42 - the answer')
print_colored("But what's the question?")
print('Hum?')
|