EADST

ValueError: invalid literal for int() with base 10

ValueError: invalid literal for int() with base 10 in Python.

Use eval() to avoid this error.

test = "1.234, 56.7890"
point = test.split(",")
# print(int(point[0])) ## ValueError: invalid literal for int() with base 10: '1.234'
print(int(point[0].split(".")[0])) # 1
print(eval(point[0])) # 1.234
print(int(eval(point[0]))) # 1
相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
LeetCode GGML Pytorch Domain 签证 C++ v0.dev Cloudreve scipy Distillation Translation 证件照 JSON Animate ModelScope git LLM ResNet-50 Use VPN DeepStream Zip 财报 RAR Password 域名 SAM FlashAttention 图形思考法 Crawler git-lfs Proxy 继承 Plotly Transformers 算法题 Llama Python uWSGI LaTeX LLAMA LoRA CSV TensorFlow XGBoost BeautifulSoup SVR Quantize Disk Freesound CTC FP32 Statistics UI Template ChatGPT 报税 Dataset tar Logo diffusers Agent Shortcut News Linux Hotel Qwen2.5 飞书 transformers FP16 DeepSeek Bipartite Web Algorithm Markdown Michelin GPT4 Knowledge CLAP Interview 递归学习法 Color Plate 顶会 API Django Hungarian TSV Streamlit Miniforge Firewall Claude Video Github 公式 llama.cpp FastAPI Review Vim Bin Base64 Data EXCEL CUDA IndexTTS2 RGB GoogLeNet XML Magnet Excel v2ray SQLite PIP OCR VSCode Conda Ptyhon WebCrawler NLTK PDB FP64 WAN Hilton 强化学习 Pandas Datetime Gemma 多进程 Attention CEIR HuggingFace hf Search 多线程 CV printf Land Jupyter NLP AI 第一性原理 mmap uwsgi Sklearn Quantization 关于博主 Clash Qwen2 UNIX CAM Breakpoint Tiktoken Safetensors Numpy logger HaggingFace Windows 净利润 NameSilo Nginx Mixtral OpenCV PyTorch InvalidArgumentError Food COCO Augmentation Input Anaconda Jetson YOLO tqdm TensorRT Google Pillow Baidu 版权 Paper OpenAI QWEN PyCharm Tensor Bitcoin GIT Bert GPTQ ONNX PDF Qwen MD5 Website SQL TTS Random SPIE Docker Git 阿里云 音频 搞笑 Paddle Permission torchinfo Image2Text FP8 腾讯云 BF16 Ubuntu CC Pickle BTC Tracking VGG-16 Math Vmess Diagram Heatmap Card
站点统计

本站现有博文320篇,共被浏览756809

本站已经建立2421天!

热门文章
文章归档
回到顶部