Using "but" in Chinese is really simple and easy to learn, and it involves two words. No "buts" about it!

Basic Pattern:
There are two main words for "but" in Chinese: "可是" (kěshì) and "但是" (dànshì). These are largely the same, with some small differences:

可是 vs 但是

可是 但是
Lighter Stronger
Less formal More formal
Used more in speech Used more in writing
Used more in the north Used more in the south

Examples:
Usually "可是" and "但是" precede a new phrase within a sentence:

Wǒ xǐhuɑn, dànshì wǒ bú xūyào.
我 喜欢,但是 我 不 需要。
I like it, but I don't need it.

Zài túshūɡuǎn nǐ kéyǐ hēshuǐ, dànshì bú kéyǐ chōuyān.
在 图书馆 你 可以 喝水,但是 不 可以 抽烟。
In the library you can drink water, but you can't smoke.