Is there a trigonometric operator in Python?

Asked 2 years ago, Updated 2 years ago, 20 views

Is there a trigonometric operator in Python? How do you use it if you have one?

python

2022-09-22 22:38

1 Answers

It is available in version 2.5 and later. a if test else b Use with . Returns a if test is true, or b if not.

c test ? a : b; You can think of it as the same.

However, please be careful because the order is different from most languages such as C and Java.

For example, >> ‘true’ if True else ‘false’ ‘true’ 'true'

For more information, see: Conditional expressions


2022-09-22 22:38

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.