Python Forum
is there a single function to confine a number between two others?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
is there a single function to confine a number between two others?
#6
how it reads in code the i want to be readable is my concern. the reduced code does not make it a readable as i want, hence my step-by-step in my confine() function.

i'm fine with using my own function. i have it in my big collection. i was just interested if i missed one in the Python library. but now i'm curious if someone can come up with a better name.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
RE: is there a single function to confine a number between two others? - by Skaperen - Nov-24-2020, 11:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Checking the number of arguments a function takes Chirumer 3 2,217 Jul-06-2021, 04:56 PM
Last Post: Chirumer
  Why is the function returning None for a * b instead of number? omm 10 4,403 Nov-05-2020, 01:17 PM
Last Post: omm
  RuntimeError: Optimal parameters not found: Number of calls to function has reached m bntayfur 0 6,187 Aug-05-2020, 04:41 PM
Last Post: bntayfur
  basic random number generator in replace function krug123 2 2,077 Jul-31-2020, 01:02 PM
Last Post: deanhystad
  Counting number of occurrences of a single digit in a list python_newbie09 12 5,647 Aug-12-2019, 01:31 PM
Last Post: perfringo
  My function won't return the sum unless the last paramater is an odd number. Maximuskiller78 1 2,351 Sep-29-2018, 03:11 AM
Last Post: ichabod801
  Write lambda function in pyhhon to coy data from multiple JSON into a single JSON fil anandmn85 2 4,280 Apr-19-2018, 05:56 AM
Last Post: anandmn85
  argument parser: to execute single function, and subsequent functions also raghu 10 5,981 Mar-12-2018, 06:57 AM
Last Post: wavic
  function for a single string number of syllables tebirkes 2 4,539 Nov-02-2016, 03:44 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020