InternLM学习笔记

入门岛

1. Linux基础知识





2. Python 基础知识

python 复制代码
from collections import Counter


text = """
Got this panda plush toy for my daughter's birthday,
who loves it and takes it everywhere. It's soft and
super cute, and its face has a friendly look. It's
a bit small for what I paid though. I think there
might be other options that are bigger for the
same price. It arrived a day earlier than expected,
so I got to play with it myself before I gave it
to her.
"""


def wordcount(text: str):
    text = text.lower().replace('.', '').replace(',', '').replace('\n', ' ')
    words = [word[:-2] if word.endswith("'s") else word for word in text.split(' ') if word]
    return dict(Counter(words))


if __name__ == '__main__':
    res = wordcount(text)
    print(res)
相关推荐
科技林总几秒前
【系统分析师】12.1 软件架构的概念
学习
FC皇家慕尼黑5 分钟前
Claude Code学习--从搭建Nano Claude Code学习CC机制的底层原理
学习·ai·claude code
AI视觉网奇10 分钟前
动作迁移算法笔记 2026
人工智能·笔记
happymaker062624 分钟前
web前端学习日记——DAY01(HTML基本标签)
前端·学习·html
FC皇家慕尼黑29 分钟前
Claude Code学习--从搭建Nano Claude Code学习CC机制的底层原理pt2
学习·ai·claude code
handler0136 分钟前
基础算法:分治
c语言·开发语言·c++·笔记·学习·算法·深度优先
码喽7号1 小时前
Springboot学习六:MybatisPlus的多表查询以及分页查询
java·spring boot·学习
不想看见4041 小时前
Implement Queue using Stacks栈和队列--力扣101算法题解笔记
笔记·算法·leetcode
艾莉丝努力练剑1 小时前
【MYSQL】MYSQL学习的一大重点:数据库基础
linux·运维·服务器·数据库·c++·学习·mysql
宇宙realman_9991 小时前
Git 本地版本控制极简使用笔记(Qt 项目专用)
笔记·git