Python Tricks
kishore Babu Valluri
6/13/20251 min read
1. Sort the list based on derived values
S=[10,-5,100,-20]
s.sort() #sorting based on given values
print(s)
Output:
-20 -5 10 100
s=[10,-5,100,-20]
s.sort(key=lambda x:x**2) # sorting based on derived values
print(s)
output:
-5 10 -20 100
Let's Get in Touch
marketing@deepaiautomation.com
+91 6309397994
ยฉ 2025. All rights reserved.
Industries
Manufacturing
Financial Services
Retail
Solutions
DocuMind AI - Intelligent Document Migration
InsightEdge AI - Intelligent Power BI Reporting & Analytics
DCT AI - Digital Control Tower for Intelligent Enterprise Visibility
Inventra AI - Intelligent Inventory Optimization Platform
Maintenix AI - Predictive Maintenance Intelligence Platform
PayPredict AI - Intelligent Customer Payment Prediction Platform
SegMind AI - Intelligent Customer Segmentation & RFM Analytics Platform
DataForge AI - Intelligent ETL & Analytics Modernization Platform
DataSense AI - Intelligent Data Quality & Outlier Detection Agent
