From 97ba4864e53b8efca1d2508756b083461087bbcf Mon Sep 17 00:00:00 2001 From: bhnpat <72167564+bhnpat@users.noreply.github.com> Date: Fri, 2 Oct 2020 15:57:02 +0530 Subject: [PATCH] Adding swapping variables one liner --- one_liner.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/one_liner.py b/one_liner.py index 2414aae..d705e68 100644 --- a/one_liner.py +++ b/one_liner.py @@ -1 +1,4 @@ -print([(i, j) for i in range(3) for j in range(7)]) \ No newline at end of file +print([(i, j) for i in range(3) for j in range(7)]) + +#Swapping two variables +a, b = b, a